<?php
include './inc.php';

$do = $_POST['do'];

switch ($do) {
	case 'guestbook':
		$ret = Guestbook::add($_POST['guestname'], $_POST['email'], $_POST['telephone'], $_POST['content']);
		
		$result = array(
			'result'	=> $ret,
			'msg'		=> $ret ? $GLOBALS['LSuccess'] : $GLOBALS['LFailure']
		);
		echo json_encode($result);
		exit;
	break;
	
	default:
		;
	break;
}